#!/usr/bin/env python
# @Date    : 2022-04-25
# @Author  : Bright (brt2@qq.com)
# @Link    : https://gitee.com/brt2
# @Version : 0.1.0

import tornado.httpserver
import tornado.web

class IndexHandler(tornado.web.RequestHandler):
    def get(self):
        id = self.get_argument("id", "0")
        self.write("hello world, id = " + id)

def app_run(app, *args, **kwargs):
    import tornado.ioloop
    app.listen(kwargs.get("port", 8080))
    tornado.ioloop.IOLoop.current().start()

def make_app(app_name, **kwargs):
    raise NotImplementedError()

    url_router = [(r"/", IndexHandler),]
    app = tornado.web.Application(url_router)
    return app
